<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户管理</title>
    <link rel="stylesheet" href="../../layui/css/layui.css">
    <style>
          .layui-table-cell{
              text-align:center;
              height: auto;
              white-space: normal;
          }
          .layui-table img{
            max-width:100px;
          }
    </style>
</head>
<body>
<table class="layui-hide" id="userTable" lay-filter="userTable"></table>


<script src="../../layui/layui.js"></script>
<script>
    layui.use(['table','layer','form','jquery'], function () {
        var table = layui.table,
            layer = layui.layer,
            form = layui.form,
            $ = layui.jquery;

        table.render({
            elem: '#userTable',
            url:'../../selectAllUser.do',
            title: '用户管理',
            cols: [[
                {field:'name', title:'姓名'},
                {field:'sex', title:'性别'},
                // {field:'headImgAddress', title:'头像',templet:'<div><img src="{{d.headImgAddress}}"></div>'},
                {field:'headImgAddress', title:'头像',templet:function (d) {
                        return '<div><img src='+d.headImgAddress+'></div>'}
                },
            ]],
            page: true,
            limits:[5,10,15,20],   //显示的几页
        });
    });
</script>
</body>
</html>